package com.hackerrank.challenges.botcleanlarge;

import java.util.Scanner;

public class Solution {
	/* Head ends here */
	static void next_move(int posx, int posy, int dimx, int dimy, String[] board){
		int md = Integer.MAX_VALUE, mx = posx, my = posy;
		for(int i = 0; i < board.length; i++) {
			char[] c = board[i].toCharArray();
			for(int j = 0; j < c.length; j++) {
				if(c[j] == 'd') {
					int d = Math.abs(posx - i) + Math.abs(posy - j);
					if(d < md) {
						md = d;
						mx = i;
						my = j;
					}
				}
			}
		}
		if(mx < posx)
			System.out.println("UP");
		else if(mx > posx)
			System.out.println("DOWN");
		else if(my < posy)
			System.out.println("LEFT");
		else if(my > posy)
			System.out.println("RIGHT");
		else
			System.out.println("CLEAN");
	}
	/* Tail starts here */
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int [] pos = new int[2];
		int [] dim = new int[2];
		for(int i=0;i<2;i++) pos[i] = in.nextInt();
		for(int i=0;i<2;i++) dim[i] = in.nextInt();
		String board[] = new String[dim[0]];
		for(int i=0;i<dim[0];i++) board[i] = in.next();
		in.close();
		next_move(pos[0], pos[1], dim[0], dim[1], board);
	}
}
